import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:jet_rails/jr_app/jr_widgets/jr_app_bar.dart';
import 'package:jet_rails/jr_app/jr_widgets/jr_common_tile.dart';
import 'package:jet_rails/jr_app/jr_widgets/jr_scaffold.dart';
import 'package:jet_rails/jr_utils/jr_device.dart';
import 'package:jet_rails/jr_utils/jr_snippet.dart';

class JrAboutView extends StatefulWidget {
  const JrAboutView({Key? key}) : super(key: key);

  @override
  State<JrAboutView> createState() => _JrAboutViewState();
}

class _JrAboutViewState extends State<JrAboutView> {
  @override
  Widget build(BuildContext context) {
    return JrScaffold(
        appBar: JrAppBar(
          title: 'About',
        ),
        body: Padding(
          padding: const EdgeInsets.symmetric(horizontal: 16),
          child: Column(
            children: [
              SizedBox(height: 39.h),
              Container(
                height: 88,
                decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(24),
                    image: const DecorationImage(image: AssetImage('assets/images/logo.png'))),
              ),
              SizedBox(height: 12.h),
              Text('JetRails', style: TextStyle(fontSize: 16.sp).merge(JrSnippets.commonTextStyle)),
              SizedBox(height: 12.h),
              Text(
                'Version ${JrDevice.version}',
                style: TextStyle(fontSize: 12.sp, color: const Color(0xFFBC14B5)),
              ),
              SizedBox(height: 67.h),
              JrCommonTile(
                content: Text('Terms andConditions', style: TextStyle(fontSize: 16.sp, color: Colors.white)),
                onTap: () => JrSnippets.tapTermOfUse(),
              ),
              SizedBox(height: 16.h),
              JrCommonTile(
                content: Text('Privacy Policy', style: TextStyle(fontSize: 16.sp, color: Colors.white)),
                onTap: () => JrSnippets.tapPrivacyPolicy(),
              ),
            ],
          ),
        ));
  }
}
